#include <iostream>
#include <string>
#include <cctype>

using namespace std;

int getPositiveInteger() {
    string input;
    int number;

    while (true) {
        cout << "Enter a positive integer: ";
        getline(cin, input);

        bool valid = true;
        for (char c : input) {
            if (!isdigit(c)) {
                valid = false;
                break;
            }
        }

        if (!valid || input.empty()) {
            cout << "Invalid input, please enter a positive number" << endl;
            continue;
        }

        number = stoi(input);

        if (number <= 0) {
            cout << "Invalid input, please enter a positive number" << endl;
            continue;
        }

        break;
    }

    return number;
}

void calculateAndPrintSum(int number) {
    string digits_str = to_string(number);
    int sum = 0;
    for (int i = 0; i < digits_str.size(); ++i) {
        int digit = digits_str[i] - '0';
        if (i< digits_str.size()-1){
        cout  << digit <<'+';
        sum+=digit;
    }else {
        cout  << digit;
    }
    }
    cout << '=' << sum << endl;
}

int main() {
    int number = getPositiveInteger();
    calculateAndPrintSum(number);
    return 0;
}